package com.yzlwb.skt.service.impl;

import java.util.List;
import com.yzlwb.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yzlwb.skt.mapper.SktTaskHistoryMapper;
import com.yzlwb.skt.domain.SktTaskHistory;
import com.yzlwb.skt.service.ISktTaskHistoryService;

/**
 * 任务执行记录Service业务层处理
 * 
 * @author wfy
 * @date 2025-11-14
 */
@Service
public class SktTaskHistoryServiceImpl implements ISktTaskHistoryService 
{
    @Autowired
    private SktTaskHistoryMapper sktTaskHistoryMapper;

    /**
     * 查询任务执行记录
     * 
     * @param id 任务执行记录主键
     * @return 任务执行记录
     */
    @Override
    public SktTaskHistory selectSktTaskHistoryById(Long id)
    {
        return sktTaskHistoryMapper.selectSktTaskHistoryById(id);
    }

    /**
     * 查询任务执行记录列表
     * 
     * @param sktTaskHistory 任务执行记录
     * @return 任务执行记录
     */
    @Override
    public List<SktTaskHistory> selectSktTaskHistoryList(SktTaskHistory sktTaskHistory)
    {
        return sktTaskHistoryMapper.selectSktTaskHistoryList(sktTaskHistory);
    }

    /**
     * 新增任务执行记录
     * 
     * @param sktTaskHistory 任务执行记录
     * @return 结果
     */
    @Override
    public int insertSktTaskHistory(SktTaskHistory sktTaskHistory)
    {
        sktTaskHistory.setCreateTime(DateUtils.getNowDate());
        return sktTaskHistoryMapper.insertSktTaskHistory(sktTaskHistory);
    }

    /**
     * 修改任务执行记录
     * 
     * @param sktTaskHistory 任务执行记录
     * @return 结果
     */
    @Override
    public int updateSktTaskHistory(SktTaskHistory sktTaskHistory)
    {
        sktTaskHistory.setUpdateTime(DateUtils.getNowDate());
        return sktTaskHistoryMapper.updateSktTaskHistory(sktTaskHistory);
    }

    /**
     * 批量删除任务执行记录
     * 
     * @param ids 需要删除的任务执行记录主键
     * @return 结果
     */
    @Override
    public int deleteSktTaskHistoryByIds(Long[] ids)
    {
        return sktTaskHistoryMapper.deleteSktTaskHistoryByIds(ids);
    }

    /**
     * 删除任务执行记录信息
     * 
     * @param id 任务执行记录主键
     * @return 结果
     */
    @Override
    public int deleteSktTaskHistoryById(Long id)
    {
        return sktTaskHistoryMapper.deleteSktTaskHistoryById(id);
    }
}
